package main.pojo;

import java.util.Date;

/**
 * 优惠券
 *
 * @TableName COUPONS
 */

public class Coupons  {
    /**
     * 主键
     */
    private String id;

    /**
     * 所属店铺
     */
    private String store;

    /**
     * 优惠券名
     */
    private String couponName;

    /**
     * 有效开始时间
     */
    private Date startTime;

    /**
     * 有效结束时间
     */
    private Date endTime;

    /**
     * 总数
     */
    private Long total;

    /**
     * 已领张数
     */
    private Long get;

    /**
     * 已使用张数
     */
    private Long used;

    /**
     * 类型  1 满减  2 打折
     */
    private String type;

    /**
     * 创建者
     */
    private String creator;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 更新者
     */
    private String updater;

    /**
     * 更新时间
     */
    private Date updateDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getStore() {
        return store;
    }

    public void setStore(String store) {
        this.store = store;
    }

    public String getCouponName() {
        return couponName;
    }

    public void setCouponName(String couponName) {
        this.couponName = couponName;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Long getGet() {
        return get;
    }

    public void setGet(Long get) {
        this.get = get;
    }

    public Long getUsed() {
        return used;
    }

    public void setUsed(Long used) {
        this.used = used;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Coupons coupons = (Coupons) o;

        if (id != null ? !id.equals(coupons.id) : coupons.id != null) return false;
        if (store != null ? !store.equals(coupons.store) : coupons.store != null) return false;
        if (couponName != null ? !couponName.equals(coupons.couponName) : coupons.couponName != null) return false;
        if (startTime != null ? !startTime.equals(coupons.startTime) : coupons.startTime != null) return false;
        if (endTime != null ? !endTime.equals(coupons.endTime) : coupons.endTime != null) return false;
        if (total != null ? !total.equals(coupons.total) : coupons.total != null) return false;
        if (get != null ? !get.equals(coupons.get) : coupons.get != null) return false;
        if (used != null ? !used.equals(coupons.used) : coupons.used != null) return false;
        if (type != null ? !type.equals(coupons.type) : coupons.type != null) return false;
        if (creator != null ? !creator.equals(coupons.creator) : coupons.creator != null) return false;
        if (createDate != null ? !createDate.equals(coupons.createDate) : coupons.createDate != null) return false;
        if (updater != null ? !updater.equals(coupons.updater) : coupons.updater != null) return false;
        return updateDate != null ? updateDate.equals(coupons.updateDate) : coupons.updateDate == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (store != null ? store.hashCode() : 0);
        result = 31 * result + (couponName != null ? couponName.hashCode() : 0);
        result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
        result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
        result = 31 * result + (total != null ? total.hashCode() : 0);
        result = 31 * result + (get != null ? get.hashCode() : 0);
        result = 31 * result + (used != null ? used.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (creator != null ? creator.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (updater != null ? updater.hashCode() : 0);
        result = 31 * result + (updateDate != null ? updateDate.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Coupons{" +
                "id='" + id + '\'' +
                ", store='" + store + '\'' +
                ", couponName='" + couponName + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", total=" + total +
                ", get=" + get +
                ", used=" + used +
                ", type='" + type + '\'' +
                ", creator='" + creator + '\'' +
                ", createDate=" + createDate +
                ", updater='" + updater + '\'' +
                ", updateDate=" + updateDate +
                '}';
    }
}